home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / Comm / AmiTCP30b2.lha / netinclude / rpc / types.h < prev    next >
C/C++ Source or Header  |  1994-04-07  |  3KB  |  121 lines

  1. /*
  2.  * $Id: types.h,v 1.4 1994/04/07 20:28:04 jraja Exp $
  3.  *
  4.  * $Log: types.h,v $
  5.  * Revision 1.4  1994/04/07  20:28:04  jraja
  6.  * Changed _UNISTD_H_ to UNISTD_H
  7.  *
  8.  * Revision 1.3  1994/03/09  01:55:46  jraja
  9.  * Added unistd.h, cleaned up a little.
  10.  *
  11.  * Revision 1.2  1993/11/10  01:02:57  jraja
  12.  * ANSI prototypes.
  13.  * Added few misc. prototypes.
  14.  *
  15.  */
  16. /* @(#)types.h    2.3 88/08/15 4.0 RPCSRC */
  17. /*
  18.  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  19.  * unrestricted use provided that this legend is included on all tape
  20.  * media and as a part of the software program in whole or part.  Users
  21.  * may copy or modify Sun RPC without charge, but are not authorized
  22.  * to license or distribute it to anyone else except as part of a product or
  23.  * program developed by the user.
  24.  * 
  25.  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
  26.  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
  27.  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
  28.  * 
  29.  * Sun RPC is provided with no support and without any obligation on the
  30.  * part of Sun Microsystems, Inc. to assist in its use, correction,
  31.  * modification or enhancement.
  32.  * 
  33.  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
  34.  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
  35.  * OR ANY PART THEREOF.
  36.  * 
  37.  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
  38.  * or profits or other special, indirect and consequential damages, even if
  39.  * Sun has been advised of the possibility of such damages.
  40.  * 
  41.  * Sun Microsystems, Inc.
  42.  * 2550 Garcia Avenue
  43.  * Mountain View, California  94043
  44.  */
  45. /*      @(#)types.h 1.18 87/07/24 SMI      */
  46.  
  47. /*
  48.  * Rpc additions to <sys/types.h>
  49.  */
  50. #ifndef __TYPES_RPC_HEADER__
  51. #define __TYPES_RPC_HEADER__
  52.  
  53. #ifndef SYS_TYPES_H
  54. #include <sys/types.h>
  55. #endif
  56. #ifndef SYS_TIME_H
  57. #include <sys/time.h>
  58. #endif
  59.  
  60. #include <stddef.h>
  61.  
  62. #ifndef UNISTD_H
  63. #include <unistd.h>
  64. #endif
  65.  
  66. /*
  67.  * Check against short integers
  68.  */
  69. #if __SASC && defined(_SHORTINT)
  70. #error RPC library works with 32-bit integers only.
  71. #endif
  72.  
  73. /*
  74.  * Support for Amiga SAS/C 6.x (add others)
  75.  */
  76. #if __SASC
  77. #define XDRFUN __regargs
  78. #else
  79. #define XDRFUN
  80. #endif /* __SASC */
  81.  
  82. #define    bool_t  int
  83. #define    enum_t    int
  84. #ifndef FALSE
  85. #    define    FALSE    (0)
  86. #endif
  87. #ifndef TRUE
  88. #    define    TRUE    (1)
  89. #endif
  90. #define __dontcare__    -1
  91. #ifndef NULL
  92. #    define NULL 0L
  93. #endif
  94.  
  95. extern void exit(int code);
  96. #ifndef USE_MEM_STUBS
  97. extern void *malloc(size_t n);
  98. extern void *calloc(size_t c, size_t n);
  99. extern void free(void *p);
  100. #define mem_alloc malloc
  101. #define mem_calloc calloc
  102. #define mem_free(ptr, bsize)    free(ptr)
  103. #else
  104. extern void *mem_alloc(size_t bsize);
  105. extern void *mem_calloc(size_t nelt, size_t esize);
  106. extern void mem_free(void *ptr, size_t bsize);
  107. #endif
  108.  
  109. #ifndef INADDR_LOOPBACK
  110. #define       INADDR_LOOPBACK         (u_long)0x7F000001
  111. #endif
  112. #ifndef MAXHOSTNAMELEN
  113. #define        MAXHOSTNAMELEN  64
  114. #endif
  115.  
  116. extern int _rpc_dtablesize(void);
  117. extern int bindresvport(int sd, struct sockaddr_in * sin);
  118. extern void get_myaddress(struct sockaddr_in * addr);
  119.  
  120. #endif /* ndef __TYPES_RPC_HEADER__ */
  121.